package com.woniuxy.carlife.mapper;

import com.woniuxy.carlife.domain.ServiceGood;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author fx
 * @ClassName:ServiceGoodMapper
 * @Description: 保养服务商品mapper接口
 * @date 2021/4/6 20:00
 **/

public interface ServiceGoodMapper extends BaseMapper<ServiceGood> {

    /**
     * 功能描述〈根据门店id查询所有上架商品〉
     * @author:fx
     * @param: @param null:
     * @return:
     * @Date 2021/4/12 10:46
     * @throws
     */
    @Select("SELECT  " +
            " store_id, " +
            " service_good_name, " +
            " service_good_category, " +
            " service_good_pic, " +
            " service_good_status, " +
            " service_good_price, " +
            " service_good_brand " +
            "FROM t_service_good  " +
            "WHERE store_id=1  " +
            "AND service_good_status='上架'")
    List<ServiceGood> findServiceGoodByStatusAndStoreId(Integer storeId);
}
